﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using xTeam.HengLe.Entity;

namespace xTeam.HengLe.Controller.Website
{
    public class HomeController : BaseController
    {
        public ActionResult Index()
        {
            HomeViewModel viewModel = new HomeViewModel() { ImageRoot = _imageRoot };

            int pageCount = 0;
            List<EProduct> productlist = _productDataAccess.Search(3, 0, 0, string.Empty, ref pageCount);
            viewModel.CommandList = productlist;
            return View(viewModel);
        }

        public ActionResult Menu(string moduleKey = "")
        {
            List<EClassify> classifyList = _classifyDataAccess.GetClassLisytByModuleKey(moduleKey);
            return View(classifyList);
        }
    }
}
